package com.giao.service;

import com.giao.mapper.FactoryMapper;
import com.giao.pojo.FactoryC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FactoryServiceImpl implements FactoryService {

    @Autowired
    private FactoryMapper factoryMapper;

    @Override
    public List<FactoryC> findAllFactory() {
        return factoryMapper.findAllFactory();
    }

    @Override
    public int deleteFactory(int id) {
        return factoryMapper.deleteFactory(id);
    }

    @Override
    public int insertFactory(FactoryC factoryC) {
        return factoryMapper.insertFactory(factoryC);
    }

    @Override
    public int updateFactory(FactoryC factoryC) {
        return factoryMapper.updateFactory(factoryC);
    }

    @Override
    public FactoryC FactoryById(int id) {
        return factoryMapper.FactoryById(id);
    }

    @Override
    public int updatestartok(Integer factory_id) {
        return factoryMapper.updatestartok(factory_id);
    }

    @Override
    public int updatestartno(Integer factory_id) {
        return factoryMapper.updatestartno(factory_id);
    }

    @Override
    public int deleteFactoryC(Integer factory_id) {
        return factoryMapper.deleteFactoryC(factory_id);
    }
}
